﻿using System;

namespace TouShuShenQi.BlazorCore.PhotinoAPI.Modules.Default
{
    [PhotinoName("app")]
    internal class AppModule : PhotinoModuleBase
    {
        public AppModule(PhotinoApi api) : base(api) { }

        public static void Exit(int exitCode = 0) => Environment.Exit(exitCode);

        public static string Cwd() => Environment.CurrentDirectory;

        public void SetUseAsync(bool UseAsync) => Api.SetUseAsync(UseAsync);
    }
}
